package com.tailyou.androidlearning202400.kl

fun main() {
    // 全参构造函数创建对象
    val phone1 = Phone("华为", "Meta 60 Pro")
    phone1.call("刘德华")

    // 空参构造函数创建对象
    val phone2 = Phone()
    phone2.brand = "华为"
    phone2.model = "Pura 70 Pro"
    phone2.call("刘德华")

    // 定义子类的对象
    val phone3 = HWPhone("耀金黑", 8000f)
    phone3.brand = "华为"
    phone3.model = "Meta60Pro"
    phone3.printInfo()
    phone3.call("刘德华")
}